package com.ali.demo.unicom.ons;

import com.alibaba.fastjson.JSON;

public class ONSHelper {

    public static final String TOPIC_SUBJECT_TX = "hongling_subject_tx";
    public static final String TAG_AUTOBID = "AUTOBID";
    public static final String TAG_CREATE = "CREATE";

    public static final String TOPIC_SUBJECT = "hongling_subject";
    public static final String TAG_REVIEW = "REVIEW";

    public static final byte[] obj2Body(Object obj) {
	return JSON.toJSONBytes(obj);
    }

    public static final <T> T body2Obj(byte[] body, Class<T> clazz) {
	return JSON.parseObject(body, clazz);
    }
}
